package pub.strawhat.album.model;

import java.io.Serializable;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.crypto.hash.SimpleHash;

public class BaseVO implements Serializable {

	private static final long serialVersionUID = 5754919459818751613L;

	private String creationTime;
	private String createUser;
	private String modifyTime;
	private String modifyUser;

	public String getCreationTime() {
		return creationTime;
	}

	public void setCreationTime(String creationTime) {
		this.creationTime = creationTime;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public String getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(String modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getModifyUser() {
		return modifyUser;
	}

	public void setModifyUser(String modifyUser) {
		this.modifyUser = modifyUser;
	}

	public String getCurrentUser() {
		String name = "";
		UserVO user = (UserVO) SecurityUtils.getSubject().getPrincipal();
		if (null != user) {
			name = user.getUsername();
		}
		return name;
	}

	public static void main(String[] args) {
		Object obj = new SimpleHash("MD5", "admin", null, 2);
		System.out.println(obj);
	}
}
